package com.dukk.gis.tools;

import org.geotools.geojson.geom.GeometryJSON;
import org.locationtech.jts.geom.Geometry;
import java.io.IOException;

/**
 * geojson处理
 * @author 小豆子
 * @version 2023-03-29
 */
public class GeoJsonTool {

    static GeometryJSON gjson = new GeometryJSON();

    public static Geometry read(String geoJson) throws IOException {
        return gjson.read(geoJson);
    }

    public static String toJSONString(Geometry geometry){
        return gjson.toString(geometry);
    }

}
